﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EIIS.Infrastructure.Service.Business;
using EIIS.Infrastructure.Service;
using EIIS.Infrastructure.Repositories.Business;
using EIIS.Infrastructure.Model.Business;

namespace EIIS.Infrastructure.Service.Implement
{
    public class PackageManager:GenericManagerBase<Package>,IPackageManager
    {
        public IList<Package> LoadAllByPage(out long total, int ZhuangT, int page, int rows, string order, string sort)
        {
            return ((IPackageRepository)this.CurrentRepository).LoadAllByPage(out total, ZhuangT, page, rows, order, sort).ToList();
        }

        public Package GetByTiaoMH(string strTiaoMH)
        {
            return ((IPackageRepository)this.CurrentRepository).GetByTiaoMH(strTiaoMH);
        }


        public bool IsExistWithTiaoMH(string strTiaoMH, string strId, string strWhere)
        {
            return ((IPackageRepository)this.CurrentRepository).IsFieldExist("TiaoMH", strTiaoMH, strId, strWhere);
        }


        public IList<Package> GetAllByZhuangT(int ZhuangT)
        {
            return ((IPackageRepository)this.CurrentRepository).GetAllByZhuangT(ZhuangT).ToList();
        }

        public bool SaveMieJ(string MieJGH, string MieJGC, string YouXQ, string ShiXSJ, string MieJR)
        {
            return ((IPackageRepository)this.CurrentRepository).SaveMieJ(MieJGH, MieJGC, YouXQ, ShiXSJ, MieJR);
        }

        public bool SaveFangF(string LingYKS, string LingYR, string ShiYR,string FaFR)
        {
            return ((IPackageRepository)this.CurrentRepository).SaveFangF(LingYKS, LingYR, ShiYR, FaFR);
        }

        public bool SaveHuiS(string HuiSR)
        {
            return ((IPackageRepository)this.CurrentRepository).SaveHuiS(HuiSR);
        }

        public long CountByZhuangT(int ZhuangT)
        {
            return ((IPackageRepository)this.CurrentRepository).CountByZhuangT(ZhuangT);
        }

        public IList<V_Package> GetAllPackageView()
        {
            return ((IPackageRepository)this.CurrentRepository).GetAllPackageView();
        }


        public IList<Package> GetInventory(string strBaoBM)
        {
            return ((IPackageRepository)this.CurrentRepository).GetInventory(strBaoBM);
        }

        public IList<Package> GetNoReurns(string strBaoBM)
        {
            return ((IPackageRepository)this.CurrentRepository).GetNoReurns(strBaoBM);
        }


        public IList<V_Package> GetRecordsByPeriodTime(string begin, string end,string strWhere)
        {
            return ((IPackageRepository)this.CurrentRepository).GetRecordsByPeriodTime(begin, end, strWhere);
        }

        public IList<Package> GetDayRecords()
        {
            return ((IPackageRepository)this.CurrentRepository).GetDayRecords();
        }

        public IList GetInventoryReport()
        {
            return ((IPackageRepository)this.CurrentRepository).GetInventoryReport();
        }
    }
}
